package com.ccloud.auth.common.model;

/**
 * The enum Result code.
 *
 * @author chentailai  响应码、提示信息
 */
public enum ResultCode {

    /**
     * Client authentication failed result code.
     */
    CLIENT_AUTHENTICATION_FAILED(1001,"客户端认证失败"),

    /**
     * Username or password error result code.
     */
    USERNAME_OR_PASSWORD_ERROR(1002,"用户名或密码错误"),

    /**
     * Unsupported grant type result code.
     */
    UNSUPPORTED_GRANT_TYPE(1003, "不支持的认证模式"),

    /**
     * No permission result code.
     */
    NO_PERMISSION(1005,"无权限访问！"),
    /**
     * System error result code.
     */
    SYSTEM_ERROR(500, "系统错误!"),

    /**
     * Invalid token result code.
     */
    INVALID_TOKEN(1004,"无效的token");



    private final int code;

    private final String msg;

    private ResultCode(int code,String msg){
        this.code=code;
        this.msg=msg;
    }

    /**
     * Gets code.
     *
     * @return the code
     */
    public int getCode() {
        return code;
    }

    /**
     * Gets msg.
     *
     * @return the msg
     */
    public String getMsg() {
        return msg;
    }
}
